package com.uzai.console.service.tb.tbpunishorder;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.taobao.api.TaobaoClient;
import com.uzai.common.exception.BusinessException;
import com.uzai.common.result.ResponseCode;
import com.uzai.console.common.ResponseMsg;
import com.uzai.console.component.excel.template.TbPunishOrderExcelDemo;
import com.uzai.console.dto.remoteapi.UploadTbPunishOrderByUzaiToolBoxDto;
import com.uzai.console.dto.tb.tbpunishorder.*;
import com.uzai.console.dto.wechatprivate.wxcontacts.ExportResultDto;
import com.uzai.console.dto.wechatprivate.wxcontacts.WxContactsQuery;
import com.uzai.console.entity.Merchant;
import com.uzai.console.entity.TbToken;
import com.uzai.console.enums.SmsType;
import com.uzai.console.vo.exportinfo.ExportAmountVo;
import com.uzai.console.vo.tb.tbpunishorder.TbPunishOrderAutoChargebackVo;
import com.uzai.console.vo.tb.tbpunishorder.TbPunishOrderInfoVo;
import org.apache.commons.lang3.StringUtils;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author liuqi
 * @date 2021年08月13日 11:33
 */
public interface TbPunishOrderService {

    /**
     * 查询淘宝处罚订单列表
     * @author liuqi
     * @date 2021/8/13 11:38
     * @param tbPunishOrderQuery
     * @return null
     */
    Page<TbPunishOrderInfoVo> findTbPunishOrderList(TbPunishOrderQuery tbPunishOrderQuery);

    /**
     * 下载淘宝处罚订单
     * @author liuqi
     * @date 2021/8/13 11:38
     * @param tbPunishOrderDownLoadDto
     * @return null
     */
    void downloadTbPunishOrder(TbPunishOrderDownLoadDto tbPunishOrderDownLoadDto);

    /**
     * 处理淘宝处罚订单业务功能
     * @author liuqi
     * @date 2021/8/13 11:38
     * @param tbToken
     * @param date 查询开始订单创建时间("yyyy-MM-dd HH:mm:ss")
     * @return null
     */
    void dealTbPunishOrder(TaobaoClient client, String date, TbToken tbToken);

    /**
     * 扣款淘宝处罚订单
     * @author liuqi
     * @date 2021/8/13 11:38
     * @param tbPunishOrderIdDto
     * @return null
     */
    void takeOffTbPunishOrder(TbPunishOrderIdDto tbPunishOrderIdDto);

    /**
     * 上传淘宝处罚订单
     * @author liuqi
     * @date 2021/8/13 11:38
     * @param tbPunishOrderExcelDemoList
     * @return null
     */
    void uploadTbPunishOrderFile(List<TbPunishOrderExcelDemo> tbPunishOrderExcelDemoList, TbPunishOrderUpLoadDto tbPunishOrderUpLoadDto);

    /**
     * 悠哉工具商上传淘宝处罚订单
     * @author liuqi
     * @date 2021/8/13 11:38
     * @param uploadTbPunishOrderByUzaiToolBoxDto
     * @return null
     */
    void uploadTbPunishOrderByUzaiToolBox(UploadTbPunishOrderByUzaiToolBoxDto uploadTbPunishOrderByUzaiToolBoxDto);


    /**
     * 处罚订单查询结果导出文件前检验接口
     * @author liuqi
     * @date 2021/8/25 11:38
     * @param tbPunishOrderQuery
     */
    ExportAmountVo getExportAmount(TbPunishOrderQuery tbPunishOrderQuery);

    /**
     * 处罚订单查询结果导出数据
     * @author liuqi
     * @date 2021/8/13 11:38
     * @param tbPunishOrderExportResultDto
     * @return null
     */
    void exportByQeuryResult(TbPunishOrderExportResultDto tbPunishOrderExportResultDto);

    /**
     * 查询淘宝处罚订单是否自动扣款
     * @author liuqi
     * @date 2021/8/13 11:38
     * @param merId
     * @return null
     */
    TbPunishOrderAutoChargebackVo findAutoChargeback(Long merId);

    /**
     * 修改淘宝处罚订单是否自动扣款
     * @author liuqi
     * @date 2021/8/13 11:38
     * @param tbPunishOrderAutoChargebackDto
     * @return null
     */
    void updateAutoChargeback(TbPunishOrderAutoChargebackDto tbPunishOrderAutoChargebackDto);

}
